import React from 'react'
import qs from 'qs'

import { useLocation } from 'react-router-dom'

export default function News() {

  const { search } = useLocation()
  const { id, username } = qs.parse(search.split('?')[1])

  return (
    <div>
      <h3>news</h3>
      <p>id: {id} username: {username}</p>
    </div>
  )
}
